Sequeunce:
First, we need to set the path to the python modules
In [1]:
%pylab inline
import sys, os
print 'Working in %s' % os.path.abspath(os.path.curdir)
# adding path to python modules
sys.path.append('../src/python')
Populating the interactive namespace from numpy and matplotlib
Working in /vagrant/notebooks
We import the aibs module, a small wrapper created to query parts of the Allen Institute Data api api.brain-map.org easily
In [2]:
import aibs;
api = aibs.api()
The specimen name and marker list can be found by browsing human.brain-map.org
In [3]:
# list of all experiments belonging to this specimen name
explist = api.getValidSpecimentsWithName('H08-0083.01')
# we want the first
e = explist[0]
# we then specify which markers to filter by
e.markersOfInterest = ['PCP4']
# and filter the available marker list
e.getMarkerList(verbose=False)
# finally, we query the api for the list of images that match our search criteria
e.getSectionImages()
# just confirming the name
print e.subjectName
H08-0083.01
We then import the processing module. This module was written to wrap various shell scripts & command line commands initially, but has since been expanded to include image processing steps itself, implemented in scikit image and numpy.
In [4]:
import pmip;
reload(pmip); # in case any development has occured since last import
# we create an instance of the class, passing it the experiment we defined above
pe = pmip.Processing(e)
# initializing the environment then creates the necessary directories for derived data to go
pe.initEnv();
# this is a utility command to see the total file counts in each directory
pe.listSubjectDirectory();
* initEnv
--------------------------------------------------------------------------------
found : /data/reconstruction
found : /data/reconstruction/specimens
directories for H08-0083_01 created
[0 files] /data/reconstruction/specimens/H08-0083_01/detect_points
[10 files] /data/reconstruction/specimens/H08-0083_01/detect_raw
[20 files] /data/reconstruction/specimens/H08-0083_01/register_contrast
[0 files] /data/reconstruction/specimens/H08-0083_01/register_density
[0 files] /data/reconstruction/specimens/H08-0083_01/register_points
[10 files] /data/reconstruction/specimens/H08-0083_01/register_raw
[10 files] /data/reconstruction/specimens/H08-0083_01/register_source
[0 files] /data/reconstruction/specimens/H08-0083_01/register_stack
[28 files] /data/reconstruction/specimens/H08-0083_01/register_target
[2 files] /data/reconstruction/specimens/H08-0083_01/video
In [5]:
# Set this parameter to clear all of the subject folder (careful!)
shouldClear = False
if shouldClear:
pe.clearSubjectDirs()
pe.clearRegisterSourceDirectory()
pe.listSubjectDirectory();
[0 files] /data/reconstruction/specimens/H08-0083_01/detect_points
[10 files] /data/reconstruction/specimens/H08-0083_01/detect_raw
[20 files] /data/reconstruction/specimens/H08-0083_01/register_contrast
[0 files] /data/reconstruction/specimens/H08-0083_01/register_density
[0 files] /data/reconstruction/specimens/H08-0083_01/register_points
[10 files] /data/reconstruction/specimens/H08-0083_01/register_raw
[10 files] /data/reconstruction/specimens/H08-0083_01/register_source
[0 files] /data/reconstruction/specimens/H08-0083_01/register_stack
[28 files] /data/reconstruction/specimens/H08-0083_01/register_target
[2 files] /data/reconstruction/specimens/H08-0083_01/video
We request all of the images in the section image list via the API
In [6]:
# This command retrieve the images in the section list and stores them in register_raw
pe.collectImagesForRegistration()
* collectRaw, downsample by 2^4
--------------------------------------------------------------------------------
-> collecting images from remote source
http://api.brain-map.org/cgi-bin/imageservice?path=/external/aibssan/production30/prod1/0400061699/0400061699.aff&top=1280&left=320&width=1472&height=1056&downsample=4
http://api.brain-map.org/cgi-bin/imageservice?path=/external/aibssan/production30/prod1/0400061699/0400061699.aff&top=448&left=24128&width=1516&height=1164&downsample=4
http://api.brain-map.org/cgi-bin/imageservice?path=/external/aibssan/production30/prod1/0400061843/0400061843.aff&top=64&left=64&width=1516&height=1289&downsample=4
http://api.brain-map.org/cgi-bin/imageservice?path=/external/aibssan/production30/prod1/0400061843/0400061843.aff&top=128&left=24704&width=1628&height=1285&downsample=4
http://api.brain-map.org/cgi-bin/imageservice?path=/external/aibssan/production30/prod1/0400061987/0400061987.aff&top=64&left=512&width=1584&height=1335&downsample=4
http://api.brain-map.org/cgi-bin/imageservice?path=/external/aibssan/production30/prod1/0400061987/0400061987.aff&top=512&left=24640&width=1584&height=1304&downsample=4
http://api.brain-map.org/cgi-bin/imageservice?path=/external/aibssan/production30/prod1/0400062131/0400062131.aff&top=128&left=64&width=1596&height=1332&downsample=4
http://api.brain-map.org/cgi-bin/imageservice?path=/external/aibssan/production30/prod1/0400062131/0400062131.aff&top=64&left=25664&width=1581&height=1312&downsample=4
http://api.brain-map.org/cgi-bin/imageservice?path=/external/aibssan/production30/prod1/0400062275/0400062275.aff&top=0&left=64&width=1576&height=1251&downsample=4
http://api.brain-map.org/cgi-bin/imageservice?path=/external/aibssan/production30/prod1/0400062275/0400062275.aff&top=448&left=24320&width=1604&height=1223&downsample=4
In [7]:
# Checking our work
pe.listSubjectDirectory()
[0 files] /data/reconstruction/specimens/H08-0083_01/detect_points
[10 files] /data/reconstruction/specimens/H08-0083_01/detect_raw
[20 files] /data/reconstruction/specimens/H08-0083_01/register_contrast
[0 files] /data/reconstruction/specimens/H08-0083_01/register_density
[0 files] /data/reconstruction/specimens/H08-0083_01/register_points
[10 files] /data/reconstruction/specimens/H08-0083_01/register_raw
[10 files] /data/reconstruction/specimens/H08-0083_01/register_source
[0 files] /data/reconstruction/specimens/H08-0083_01/register_stack
[28 files] /data/reconstruction/specimens/H08-0083_01/register_target
[2 files] /data/reconstruction/specimens/H08-0083_01/video
In order to register ISH images stained with different labels together into a single stack, we need a label-invariant, high contrast version of the image.
Using an ImageJ / FIJI macro, we convert each input image into a high contrast image. For details, see the script called REG-filter-red50.ijm in src/fijimacros
In [9]:
# This command takes the raw source as input and creates high-contrast versions using imageJ
# Specifically, it uses the script called REG-filter-red50.ijm in src/fijimacros
pe.createContrast()
* createContrast
--------------------------------------------------------------------------------
Executing REG-filter.ijm on 0 files
In [9]:
# checking our work
pe.listSubjectDirectory()
[0 files] /data/reconstruction/specimens/H08-0083_01/detect_points
[10 files] /data/reconstruction/specimens/H08-0083_01/detect_raw
[20 files] /data/reconstruction/specimens/H08-0083_01/register_contrast
[0 files] /data/reconstruction/specimens/H08-0083_01/register_density
[0 files] /data/reconstruction/specimens/H08-0083_01/register_points
[10 files] /data/reconstruction/specimens/H08-0083_01/register_raw
[10 files] /data/reconstruction/specimens/H08-0083_01/register_source
[0 files] /data/reconstruction/specimens/H08-0083_01/register_stack
[28 files] /data/reconstruction/specimens/H08-0083_01/register_target
[2 files] /data/reconstruction/specimens/H08-0083_01/video
Our registration code expects are sequential list of input files. This section of code reads in the list of constrast images and generates the needed list.
In [10]:
# This command takes a sorted list of the files from the high-contrast folder and renames them
pe.createFrames()
* createFrames
--------------------------------------------------------------------------------
In [11]:
# checking our work
pe.listSubjectDirectory()
[0 files] /data/reconstruction/specimens/H08-0083_01/detect_points
[10 files] /data/reconstruction/specimens/H08-0083_01/detect_raw
[20 files] /data/reconstruction/specimens/H08-0083_01/register_contrast
[0 files] /data/reconstruction/specimens/H08-0083_01/register_density
[0 files] /data/reconstruction/specimens/H08-0083_01/register_points
[10 files] /data/reconstruction/specimens/H08-0083_01/register_raw
[10 files] /data/reconstruction/specimens/H08-0083_01/register_source
[0 files] /data/reconstruction/specimens/H08-0083_01/register_stack
[28 files] /data/reconstruction/specimens/H08-0083_01/register_target
[2 files] /data/reconstruction/specimens/H08-0083_01/video
To register the image stack, we modified an ITK example to register a series of images sequentially and return the transform for each. For sequential registration, we use the previously registered image in sequence as the current registration target. This method is not ideal, but one of the few available without external fiducials.
In [16]:
# This command registers images seqeuentially, saving the transforms to a text file for each step
pe.register()
* register
--------------------------------------------------------------------------------
/vagrant/bin/RigidBodyImageRegistration /data/reconstruction/specimens/H08-0083_01/register_source/frame%04d.jpg /data/reconstruction/specimens/H08-0083_01/register_target/register%04d.jpg 10 0
Rigid registration, type: 0
Registering /data/reconstruction/specimens/H08-0083_01/register_source/frame0001.jpg to /data/reconstruction/specimens/H08-0083_01/register_source/frame0000.jpg, saving as /data/reconstruction/specimens/H08-0083_01/register_target/register0001.jpg
Registration: RegStepGradient Descent + MeanSquaresImageToMetric
0 4186.62 [-0.00795543, 448.871, 332.054, 7.94613, -4.20155]
1 4123.7 [-0.0112972, 448.871, 332.055, 7.85808, -4.24883]
2 4109.12 [-0.0139631, 448.87, 332.056, 7.77445, -4.30359]
3 4102.2 [-0.0177486, 448.869, 332.057, 7.68787, -4.35346]
4 4089.94 [-0.0216302, 448.868, 332.058, 7.60189, -4.40435]
5 4081.04 [-0.0252843, 448.867, 332.06, 7.51303, -4.45001]
6 4071.77 [-0.0309169, 448.866, 332.062, 7.42807, -4.50239]
7 4062.88 [-0.0337147, 448.864, 332.065, 7.33945, -4.54853]
8 4056.18 [-0.0359105, 448.863, 332.068, 7.25098, -4.59497]
9 4052.49 [-0.0373772, 448.861, 332.071, 7.16188, -4.64022]
10 4048.15 [-0.0363817, 448.859, 332.075, 7.07233, -4.68455]
11 4041.71 [-0.0364937, 448.858, 332.078, 6.98228, -4.72788]
12 4036.31 [-0.0365407, 448.856, 332.081, 6.89144, -4.76954]
13 4030.81 [-0.0364983, 448.855, 332.084, 6.8003, -4.81053]
14 4025.19 [-0.0364841, 448.853, 332.088, 6.70855, -4.85014]
15 4019.68 [-0.0367447, 448.852, 332.091, 6.61675, -4.88962]
16 4014.73 [-0.0369286, 448.85, 332.094, 6.52585, -4.93113]
17 4009.8 [-0.037191, 448.848, 332.098, 6.43587, -4.97461]
18 4005.44 [-0.0373435, 448.847, 332.101, 6.34662, -5.01956]
19 4001.01 [-0.0379178, 448.845, 332.104, 6.25721, -5.06419]
20 3997.99 [-0.0370695, 448.843, 332.108, 6.16705, -5.10727]
21 3990.09 [-0.0374648, 448.841, 332.111, 6.07869, -5.15395]
22 3986.68 [-0.0364719, 448.84, 332.114, 5.98918, -5.19836]
23 3979.18 [-0.0361612, 448.838, 332.117, 5.90092, -5.24524]
24 3974.06 [-0.0353999, 448.836, 332.12, 5.81288, -5.29252]
25 3968.09 [-0.0340281, 448.835, 332.124, 5.72449, -5.33913]
26 3960.73 [-0.0347331, 448.833, 332.127, 5.63585, -5.38528]
27 3957.37 [-0.0344238, 448.831, 332.13, 5.54538, -5.42774]
28 3951.88 [-0.0340353, 448.83, 332.133, 5.45439, -5.46908]
29 3946.42 [-0.0333935, 448.828, 332.136, 5.36339, -5.5104]
30 3941.14 [-0.0331793, 448.827, 332.139, 5.27434, -5.55579]
31 3936.57 [-0.0324608, 448.825, 332.142, 5.18528, -5.60113]
32 3930.9 [-0.0337008, 448.824, 332.145, 5.09786, -5.64957]
33 3929.15 [-0.0310468, 448.822, 332.148, 5.00804, -5.69332]
34 3919.32 [-0.0309875, 448.821, 332.15, 4.92024, -5.74108]
35 3914.75 [-0.0306059, 448.819, 332.153, 4.83238, -5.78873]
36 3909.88 [-0.0308194, 448.818, 332.156, 4.74462, -5.83658]
37 3905.82 [-0.0303741, 448.816, 332.158, 4.65592, -5.88264]
38 3900.54 [-0.0310259, 448.815, 332.161, 4.56735, -5.92896]
39 3897.97 [-0.0301599, 448.813, 332.164, 4.47736, -5.97245]
40 3891.09 [-0.0307536, 448.812, 332.166, 4.3895, -6.02011]
41 3888.79 [-0.0295948, 448.81, 332.169, 4.29972, -6.06403]
42 3881.36 [-0.0288868, 448.809, 332.172, 4.21224, -6.11239]
43 3875.81 [-0.0290364, 448.807, 332.174, 4.12561, -6.16226]
44 3872.5 [-0.0283384, 448.806, 332.177, 4.03723, -6.20895]
45 3866.49 [-0.0281615, 448.805, 332.179, 3.94682, -6.25158]
46 3862.09 [-0.0280113, 448.804, 332.182, 3.85609, -6.29354]
47 3857.86 [-0.0283379, 448.802, 332.184, 3.76475, -6.33415]
48 3855.23 [-0.0286911, 448.801, 332.187, 3.67473, -6.37759]
49 3852.69 [-0.0278869, 448.8, 332.189, 3.5871, -6.42568]
Optimizer stop condition: RegularStepGradientDescentOptimizer: Maximum number of iterations (50) exceeded.
Result =
Angle (radians) = -0.0278869
Angle (degrees) = -1.5978
Center X = 448.8
Center Y = 332.189
Translation X = 3.5871
Translation Y = -6.42568
Iterations = 50
Metric value = 3852.69
/dat
Registering /data/reconstruction/specimens/H08-0083_01/register_source/frame0002.jpg to /data/reconstruction/specimens/H08-0083_01/register_target/register0001.jpg, saving as /data/reconstruction/specimens/H08-0083_01/register_target/register0002.jpg
Registration: RegStepGradient Descent + MeanSquaresImageToMetric
0 3813.42 [0.000708147, 453.243, 334.293, 4.09491, -33.6087]
1 3809.07 [0.0105613, 453.243, 334.293, 4.18109, -33.6585]
2 3788.61 [0.0126044, 453.242, 334.294, 4.27429, -33.6223]
3 3780.33 [0.0129239, 453.242, 334.295, 4.37033, -33.5945]
4 3774.53 [0.0146835, 453.242, 334.297, 4.46588, -33.565]
5 3769.74 [0.0151483, 453.241, 334.298, 4.56098, -33.5342]
6 3763.77 [0.0148108, 453.241, 334.299, 4.65532, -33.501]
7 3758.56 [0.0153279, 453.24, 334.301, 4.75104, -33.4721]
8 3752.45 [0.0157865, 453.24, 334.302, 4.84547, -33.4393]
9 3746.52 [0.0164777, 453.239, 334.304, 4.93932, -33.4048]
10 3741.48 [0.017167, 453.239, 334.305, 5.03508, -33.376]
11 3736.05 [0.0171463, 453.238, 334.307, 5.13148, -33.3495]
12 3730.91 [0.0169556, 453.238, 334.309, 5.22768, -33.3223]
13 3725.4 [0.0171546, 453.238, 334.31, 5.32375, -33.2945]
14 3719.47 [0.017675, 453.237, 334.312, 5.4198, -33.2668]
15 3713.66 [0.0177065, 453.237, 334.314, 5.51587, -33.2391]
16 3707.91 [0.0184288, 453.236, 334.315, 5.61185, -33.2111]
17 3702.94 [0.0193214, 453.236, 334.317, 5.70745, -33.1818]
18 3698.16 [0.0188591, 453.235, 334.319, 5.80245, -33.1506]
19 3693.25 [0.0180789, 453.234, 334.321, 5.8981, -33.1215]
20 3687.54 [0.0190765, 453.234, 334.322, 5.99431, -33.0943]
21 3683.32 [0.0188029, 453.233, 334.324, 6.0898, -33.0647]
22 3678.27 [0.0186724, 453.233, 334.326, 6.18567, -33.0363]
23 3673.34 [0.0174366, 453.232, 334.328, 6.28236, -33.0109]
24 3668.61 [0.017002, 453.232, 334.33, 6.37839, -32.9831]
25 3663.4 [0.0167774, 453.232, 334.331, 6.47415, -32.9543]
26 3658.48 [0.0156724, 453.231, 334.333, 6.57003, -32.926]
27 3655.87 [0.0153555, 453.231, 334.334, 6.66726, -32.9026]
28 3651.65 [0.0154241, 453.23, 334.336, 6.76519, -32.8825]
29 3646.87 [0.0162995, 453.23, 334.337, 6.8627, -32.8604]
30 3641.63 [0.0158287, 453.23, 334.339, 6.9606, -32.84]
31 3637.5 [0.016573, 453.229, 334.341, 7.05866, -32.8205]
32 3633.7 [0.0170251, 453.229, 334.342, 7.15561, -32.7961]
33 3629.77 [0.0164484, 453.229, 334.344, 7.25211, -32.7699]
34 3625.28 [0.0177943, 453.228, 334.345, 7.34839, -32.743]
35 3621.54 [0.0154197, 453.228, 334.347, 7.44489, -32.7169]
36 3617.47 [0.0138111, 453.228, 334.349, 7.54336, -32.6996]
37 3615.09 [0.0163648, 453.227, 334.35, 7.64173, -32.6819]
38 3609.36 [0.0156776, 453.227, 334.352, 7.73936, -32.6603]
39 3606.25 [0.0145937, 453.227, 334.353, 7.83852, -32.6475]
40 3604.08 [0.0113935, 453.227, 334.355, 7.93667, -32.6287]
41 3603.19 [0.00927782, 453.226, 334.356, 8.03303, -32.6021]
42 3601.32 [0.0102544, 453.226, 334.357, 8.13232, -32.5903]
43 3597 [0.0120379, 453.226, 334.358, 8.23148, -32.5775]
44 3591.14 [0.0100023, 453.226, 334.359, 8.33034, -32.5626]
45 3589.38 [0.0133373, 453.226, 334.36, 8.43, -32.5551]
46 3583.72 [0.0163407, 453.226, 334.361, 8.52992, -32.5529]
47 3580.55 [0.015343, 453.226, 334.363, 8.62891, -32.5388]
48 3578.37 [0.0108787, 453.225, 334.364, 8.72865, -32.5334]
49 3579.82 [0.0103165, 453.225, 334.365, 8.82817, -32.5238]
Optimizer stop condition: RegularStepGradientDescentOptimizer: Maximum number of iterations (50) exceeded.
Result =
Angle (radians) = 0.0103165
Angle (degrees) = 0.59109
Center X = 453.225
Center Y = 334.365
Translation X = 8.82817
Translation Y = -32.5238
Iterations = 50
Metric value = 3579.82
/dat
Registering /data/reconstruction/specimens/H08-0083_01/register_source/frame0003.jpg to /data/reconstruction/specimens/H08-0083_01/register_target/register0002.jpg, saving as /data/reconstruction/specimens/H08-0083_01/register_target/register0003.jpg
Registration: RegStepGradient Descent + MeanSquaresImageToMetric
0 4117.62 [0.0326999, 448.394, 333.165, 1.12054, -2.0623]
1 3806.83 [0.0507117, 448.395, 333.166, 1.15395, -2.09481]
2 3731.32 [0.0600354, 448.397, 333.168, 1.18585, -2.13209]
3 3708.98 [0.0656872, 448.399, 333.17, 1.22323, -2.16467]
4 3702.68 [0.0697128, 448.401, 333.172, 1.265, -2.19167]
5 3700.24 [0.0725076, 448.403, 333.175, 1.30828, -2.21629]
6 3699 [0.074617, 448.404, 333.179, 1.3551, -2.23333]
7 3699.46 [0.0757936, 448.406, 333.182, 1.40053, -2.25385]
8 3698.53 [0.0766317, 448.407, 333.186, 1.44742, -2.27079]
9 3698.04 [0.0782814, 448.409, 333.189, 1.49469, -2.28655]
10 3699.18 [0.078431, 448.41, 333.193, 1.54228, -2.30137]
11 3697.57 [0.0785319, 448.411, 333.196, 1.58976, -2.31654]
12 3695.9 [0.0783907, 448.413, 333.2, 1.63715, -2.33201]
13 3693.98 [0.0784559, 448.414, 333.204, 1.68441, -2.34783]
14 3692.23 [0.0785384, 448.416, 333.207, 1.73144, -2.36437]
15 3690.52 [0.0785736, 448.417, 333.211, 1.77866, -2.38032]
16 3688.72 [0.0788548, 448.418, 333.215, 1.8257, -2.3968]
17 3687.19 [0.0793507, 448.42, 333.218, 1.87289, -2.41286]
18 3686.07 [0.080356, 448.421, 333.222, 1.91976, -2.42979]
19 3685.89 [0.0806918, 448.423, 333.226, 1.96651, -2.44707]
20 3684.5 [0.0807786, 448.424, 333.229, 2.01325, -2.46437]
21 3682.75 [0.0807379, 448.426, 333.233, 2.05977, -2.48224]
22 3680.88 [0.0808989, 448.427, 333.237, 2.10652, -2.4995]
23 3679.18 [0.0808671, 448.429, 333.241, 2.15305, -2.51737]
24 3677.3 [0.0810985, 448.431, 333.244, 2.19937, -2.53575]
25 3675.65 [0.0815031, 448.432, 333.248, 2.24568, -2.55417]
26 3674.15 [0.0819365, 448.434, 333.252, 2.29161, -2.57348]
27 3672.8 [0.0828316, 448.436, 333.255, 2.33774, -2.59233]
28 3672.39 [0.0838292, 448.437, 333.259, 2.38396, -2.61091]
29 3671.68 [0.0841, 448.439, 333.263, 2.42983, -2.63037]
30 3670.07 [0.0841135, 448.441, 333.267, 2.47562, -2.65001]
31 3668.19 [0.0841614, 448.443, 333.27, 2.52171, -2.66893]
32 3666.36 [0.0843278, 448.445, 333.274, 2.56776, -2.68796]
33 3664.68 [0.0844149, 448.446, 333.278, 2.61391, -2.70674]
34 3662.91 [0.0847224, 448.448, 333.282, 2.66011, -2.72539]
35 3661.36 [0.0851737, 448.45, 333.286, 2.70615, -2.74442]
36 3660 [0.0855403, 448.452, 333.29, 2.75197, -2.76396]
37 3658.64 [0.0855991, 448.454, 333.293, 2.79757, -2.78404]
38 3656.82 [0.0857582, 448.456, 333.297, 2.84275, -2.80501]
39 3655.11 [0.0859996, 448.457, 333.301, 2.8881, -2.82563]
40 3653.45 [0.0861518, 448.459, 333.305, 2.93307, -2.84707]
41 3651.69 [0.0865273, 448.461, 333.309, 2.97809, -2.8684]
42 3650.13 [0.0867691, 448.463, 333.312, 3.02294, -2.89008]
43 3648.5 [0.0870067, 448.466, 333.316, 3.0679, -2.91151]
44 3646.76 [0.0871367, 448.468, 333.32, 3.11236, -2.93398]
45 3644.94 [0.0873408, 448.47, 333.324, 3.15682, -2.95643]
46 3643.18 [0.087412, 448.472, 333.328, 3.20088, -2.97966]
47 3641.28 [0.0875025, 448.474, 333.331, 3.24506, -3.00267]
48 3639.4 [0.087518, 448.476, 333.335, 3.28904, -3.02606]
49 3637.43 [0.0875534, 448.479, 333.339, 3.333, -3.04948]
Optimizer stop condition: RegularStepGradientDescentOptimizer: Maximum number of iterations (50) exceeded.
Result =
Angle (radians) = 0.0875534
Angle (degrees) = 5.01644
Center X = 448.479
Center Y = 333.339
Translation X = 3.333
Translation Y = -3.04948
Iterations = 50
Metric value = 3637.43
/dat
Registering /data/reconstruction/specimens/H08-0083_01/register_source/frame0004.jpg to /data/reconstruction/specimens/H08-0083_01/register_target/register0003.jpg, saving as /data/reconstruction/specimens/H08-0083_01/register_target/register0004.jpg
Registration: RegStepGradient Descent + MeanSquaresImageToMetric
0 3986.2 [-0.00886067, 446.238, 334.22, 13.3534, -15.9764]
1 3839.71 [-0.0594223, 446.239, 334.22, 13.3392, -15.8913]
2 3572.87 [-0.056879, 446.245, 334.221, 13.3312, -15.7918]
3 3562.26 [-0.0568433, 446.25, 334.221, 13.327, -15.692]
4 3556.78 [-0.0567467, 446.256, 334.222, 13.3243, -15.5922]
5 3551.3 [-0.05671, 446.262, 334.222, 13.3224, -15.4924]
6 3545.83 [-0.0568827, 446.267, 334.222, 13.3202, -15.3926]
7 3540.66 [-0.0571681, 446.273, 334.222, 13.3171, -15.2928]
8 3535.98 [-0.0578021, 446.279, 334.223, 13.3124, -15.1931]
9 3532.38 [-0.057472, 446.284, 334.223, 13.3054, -15.0935]
10 3526.56 [-0.0579817, 446.29, 334.224, 13.2985, -14.9939]
11 3522.75 [-0.0572976, 446.296, 334.225, 13.2907, -14.8944]
12 3515.76 [-0.057578, 446.301, 334.225, 13.2842, -14.7948]
13 3511.54 [-0.0573874, 446.307, 334.226, 13.278, -14.6951]
14 3506.56 [-0.0571769, 446.313, 334.226, 13.2712, -14.5955]
15 3501.81 [-0.0571263, 446.319, 334.227, 13.2659, -14.4958]
16 3497.48 [-0.0572617, 446.324, 334.227, 13.2598, -14.3962]
17 3493.52 [-0.0573675, 446.33, 334.228, 13.2552, -14.2964]
18 3489.64 [-0.0578304, 446.336, 334.228, 13.247, -14.1969]
19 3486.88 [-0.0569207, 446.341, 334.229, 13.2382, -14.0975]
20 3480.81 [-0.0576866, 446.347, 334.23, 13.2264, -13.9984]
21 3478.74 [-0.057475, 446.353, 334.231, 13.2159, -13.8991]
22 3474.28 [-0.0574738, 446.358, 334.231, 13.2062, -13.7997]
23 3470.63 [-0.056833, 446.364, 334.232, 13.196, -13.7004]
24 3466.64 [-0.0560065, 446.37, 334.233, 13.1807, -13.6018]
25 3462.69 [-0.0578726, 446.375, 334.234, 13.1664, -13.503]
26 3461.67 [-0.0567985, 446.381, 334.235, 13.157, -13.4036]
27 3457.41 [-0.057019, 446.386, 334.236, 13.1365, -13.3059]
28 3454.87 [-0.0563251, 446.392, 334.237, 13.1167, -13.208]
29 3451.16 [-0.0559414, 446.397, 334.239, 13.0974, -13.11]
30 3448.45 [-0.0577104, 446.403, 334.24, 13.0834, -13.0112]
31 3448.06 [-0.0562675, 446.409, 334.241, 13.0622, -12.9137]
32 3444.02 [-0.058237, 446.414, 334.242, 13.0437, -12.8156]
33 3444.2 [-0.057681, 446.42, 334.243, 13.0318, -12.7164]
34 3440.88 [-0.0536629, 446.425, 334.244, 13.0081, -12.6196]
35 3437.11 [-0.0624121, 446.431, 334.245, 12.9938, -12.5211]
36 3448.94 [-0.052264, 446.437, 334.247, 12.9726, -12.4241]
37 3434.49 [-0.0680633, 446.442, 334.248, 12.9619, -12.3261]
38 3471.43 [-0.0462853, 446.448, 334.249, 12.9373, -12.2319]
39 3450.14 [-0.0838958, 446.452, 334.25, 12.9207, -12.1408]
40 3588.9 [-0.0616972, 446.46, 334.251, 12.917, -12.0437]
41 3437.38 [-0.0501228, 446.466, 334.253, 12.8822, -11.9509]
42 3431.26 [-0.0795187, 446.471, 334.253, 12.8859, -11.8555]
43 3548.66 [-0.0527802, 446.478, 334.255, 12.8705, -11.7607]
44 3424.53 [-0.0758262, 446.483, 334.257, 12.8383, -11.669]
45 3513.9 [-0.0472786, 446.49, 334.259, 12.8155, -11.5762]
46 3437.29 [-0.104272, 446.494, 334.26, 12.7886, -11.4986]
47 3727.43 [-0.0812422, 446.504, 334.258, 12.8118, -11.4047]
48 3550.39 [-0.0569228, 446.511, 334.259, 12.805, -11.3082]
49 3420.16 [-0.0766124, 446.517, 334.259, 12.8026, -11.2104]
Optimizer stop condition: RegularStepGradientDescentOptimizer: Maximum number of iterations (50) exceeded.
Result =
Angle (radians) = -0.0766124
Angle (degrees) = -4.38957
Center X = 446.517
Center Y = 334.259
Translation X = 12.8026
Translation Y = -11.2104
Iterations = 50
Metric value = 3420.16
/dat
Registering /data/reconstruction/specimens/H08-0083_01/register_source/frame0005.jpg to /data/reconstruction/specimens/H08-0083_01/register_target/register0004.jpg, saving as /data/reconstruction/specimens/H08-0083_01/register_target/register0005.jpg
Registration: RegStepGradient Descent + MeanSquaresImageToMetric
0 4758.54 [-0.0136218, 447.224, 329.376, -8.21331, -0.786536]
1 4595.12 [-0.0473664, 447.224, 329.375, -8.11923, -0.783627]
2 4350.98 [-0.0551509, 447.224, 329.37, -8.01975, -0.779055]
3 4334.67 [-0.0596053, 447.224, 329.364, -7.92005, -0.782361]
4 4329.63 [-0.0624187, 447.224, 329.359, -7.82107, -0.794949]
5 4326.38 [-0.0645241, 447.223, 329.352, -7.72293, -0.812989]
6 4322.12 [-0.0673726, 447.222, 329.346, -7.62565, -0.835096]
7 4317.71 [-0.070034, 447.22, 329.34, -7.52996, -0.863199]
8 4312.52 [-0.0723104, 447.218, 329.333, -7.43452, -0.892142]
9 4307.87 [-0.0740563, 447.217, 329.326, -7.33838, -0.918629]
10 4304.58 [-0.0754714, 447.215, 329.319, -7.24313, -0.948139]
11 4300.22 [-0.0765473, 447.213, 329.311, -7.14745, -0.976226]
12 4296.26 [-0.0770356, 447.211, 329.304, -7.0518, -1.00438]
13 4291.07 [-0.0767128, 447.209, 329.297, -6.95598, -1.03191]
14 4283.95 [-0.0767994, 447.207, 329.289, -6.86024, -1.05979]
15 4277.84 [-0.0772398, 447.205, 329.282, -6.76444, -1.0874]
16 4272.73 [-0.0768833, 447.204, 329.274, -6.66841, -1.11421]
17 4265.63 [-0.0766328, 447.202, 329.267, -6.57221, -1.14043]
18 4258.88 [-0.076355, 447.2, 329.259, -6.47571, -1.16549]
19 4252.19 [-0.0765166, 447.199, 329.252, -6.37952, -1.19175]
20 4246.6 [-0.0766562, 447.197, 329.244, -6.28311, -1.21721]
21 4240.85 [-0.0765872, 447.195, 329.237, -6.18671, -1.24265]
22 4234.38 [-0.0766252, 447.193, 329.23, -6.09049, -1.26881]
23 4228.17 [-0.0766795, 447.192, 329.222, -5.99445, -1.29561]
24 4222.08 [-0.076363, 447.19, 329.215, -5.89842, -1.32244]
25 4215.15 [-0.0762455, 447.188, 329.207, -5.80245, -1.34947]
26 4208.81 [-0.0760177, 447.186, 329.2, -5.70626, -1.37576]
27 4202.29 [-0.0756884, 447.185, 329.192, -5.61006, -1.40197]
28 4195.85 [-0.0753551, 447.183, 329.185, -5.51402, -1.4288]
29 4189.5 [-0.0756756, 447.181, 329.178, -5.4184, -1.45708]
30 4184.5 [-0.0760555, 447.179, 329.171, -5.32251, -1.48444]
31 4179.75 [-0.0763112, 447.178, 329.163, -5.22639, -1.51096]
32 4174.4 [-0.0761689, 447.176, 329.156, -5.12984, -1.53587]
33 4168.19 [-0.0762198, 447.174, 329.148, -5.03392, -1.56311]
34 4162.47 [-0.0758705, 447.172, 329.141, -4.93777, -1.58952]
35 4156.23 [-0.0758009, 447.171, 329.134, -4.84168, -1.61614]
36 4150.55 [-0.0757031, 447.169, 329.126, -4.7455, -1.64245]
37 4144.93 [-0.0756308, 447.167, 329.119, -4.649, -1.66755]
38 4139.5 [-0.0759667, 447.166, 329.111, -4.55244, -1.69245]
39 4134.64 [-0.0759444, 447.164, 329.104, -4.45562, -1.71629]
40 4129.42 [-0.0763767, 447.163, 329.097, -4.35906, -1.74115]
41 4124.72 [-0.0762064, 447.161, 329.089, -4.2622, -1.76484]
42 4119.08 [-0.0765146, 447.16, 329.082, -4.16534, -1.78852]
43 4113.99 [-0.0765381, 447.158, 329.074, -4.06862, -1.81272]
44 4108.69 [-0.0768069, 447.156, 329.067, -3.97201, -1.83741]
45 4103.91 [-0.0776534, 447.155, 329.059, -3.87556, -1.86266]
46 4100.68 [-0.0787135, 447.153, 329.052, -3.77858, -1.88578]
47 4097.7 [-0.0782, 447.152, 329.044, -3.68097, -1.90602]
48 4091.23 [-0.0782651, 447.151, 329.036, -3.58328, -1.92593]
49 4086.12 [-0.0788524, 447.149, 329.029, -3.48545, -1.9451]
Optimizer stop condition: RegularStepGradientDescentOptimizer: Maximum number of iterations (50) exceeded.
Result =
Angle (radians) = -0.0788524
Angle (degrees) = -4.51791
Center X = 447.149
Center Y = 329.029
Translation X = -3.48545
Translation Y = -1.9451
Iterations = 50
Metric value = 4086.12
/dat
Registering /data/reconstruction/specimens/H08-0083_01/register_source/frame0006.jpg to /data/reconstruction/specimens/H08-0083_01/register_target/register0005.jpg, saving as /data/reconstruction/specimens/H08-0083_01/register_target/register0006.jpg
Registration: RegStepGradient Descent + MeanSquaresImageToMetric
0 4119.01 [-0.0157956, 442.25, 330.108, -22.1092, -14.725]
1 3874.97 [-0.0620925, 442.25, 330.107, -22.0225, -14.7064]
2 3404.9 [-0.0872673, 442.25, 330.101, -21.9261, -14.7111]
3 3404.01 [-0.07374, 442.254, 330.1, -21.9214, -14.6634]
4 3389.85 [-0.0768127, 442.256, 330.097, -21.8775, -14.64]
5 3390.76 [-0.0799767, 442.258, 330.094, -21.8345, -14.615]
6 3392.32 [-0.0830819, 442.261, 330.092, -21.8044, -14.5753]
7 3394.3 [-0.082631, 442.265, 330.091, -21.7965, -14.5261]
8 3393.49 [-0.0832023, 442.269, 330.091, -21.7867, -14.4773]
9 3393.61 [-0.0788299, 442.273, 330.09, -21.7706, -14.4303]
10 3389.87 [-0.0821731, 442.277, 330.087, -21.7391, -14.3919]
11 3392.27 [-0.0832503, 442.281, 330.087, -21.7368, -14.3421]
12 3392.75 [-0.0780245, 442.285, 330.087, -21.7274, -14.2934]
13 3388.06 [-0.0811857, 442.288, 330.084, -21.6945, -14.2561]
14 3390.29 [-0.0830558, 442.292, 330.084, -21.6925, -14.2064]
15 3391.81 [-0.0771466, 442.296, 330.085, -21.7, -14.1575]
16 3386.06 [-0.0812236, 442.298, 330.082, -21.6598, -14.1284]
17 3389.5 [-0.071022, 442.302, 330.083, -21.6707, -14.0808]
18 3382.06 [-0.0758085, 442.302, 330.081, -21.6466, -14.0767]
19 3383.84 [-0.0768876, 442.303, 330.079, -21.622, -14.0731]
20 3384.68 [-0.078322, 442.304, 330.078, -21.602, -14.0582]
21 3386.4 [-0.0783133, 442.306, 330.077, -21.5908, -14.0359]
22 3386.2 [-0.0777291, 442.307, 330.076, -21.5794, -14.0138]
23 3385.15 [-0.0792029, 442.309, 330.075, -21.5647, -13.9938]
24 3386.91 [-0.0733291, 442.311, 330.075, -21.5561, -13.9711]
25 3380.83 [-0.0782824, 442.312, 330.073, -21.5331, -13.9628]
26 3385.35 [-0.0754366, 442.313, 330.072, -21.5277, -13.9386]
27 3382.03 [-0.0754206, 442.314, 330.071, -21.5028, -13.9384]
28 3381.87 [-0.0752786, 442.314, 330.069, -21.4779, -13.9373]
29 3381.58 [-0.0754678, 442.314, 330.067, -21.453, -13.9362]
30 3381.64 [-0.0751064, 442.314, 330.065, -21.4281, -13.9352]
31 3381.13 [-0.0752964, 442.314, 330.063, -21.4033, -13.9328]
32 3381.18 [-0.0745692, 442.314, 330.061, -21.3784, -13.9311]
33 3380.32 [-0.0759664, 442.315, 330.059, -21.3537, -13.9283]
34 3381.53 [-0.0732616, 442.316, 330.058, -21.3326, -13.9152]
35 3378.53 [-0.0781572, 442.316, 330.056, -21.3094, -13.9074]
36 3384.06 [-0.0684165, 442.317, 330.057, -21.315, -13.9019]
37 3378.97 [-0.069939, 442.317, 330.056, -21.3094, -13.9043]
38 3378.27 [-0.0713263, 442.317, 330.056, -21.3033, -13.9044]
39 3378.18 [-0.0719206, 442.317, 330.055, -21.2972, -13.9053]
40 3377.82 [-0.0722212, 442.317, 330.055, -21.2911, -13.9067]
41 3377.75 [-0.0728139, 442.316, 330.055, -21.285, -13.9074]
42 3377.82 [-0.0739133, 442.317, 330.054, -21.2789, -13.9063]
43 3378.92 [-0.0746012, 442.317, 330.054, -21.2728, -13.9055]
44 3379.73 [-0.0749068, 442.317, 330.053, -21.2666, -13.9057]
45 3379.98 [-0.0748917, 442.317, 330.053, -21.2603, -13.9058]
46 3379.95 [-0.0749453, 442.317, 330.052, -21.2541, -13.906]
47 3379.96 [-0.0748736, 442.317, 330.052, -21.2479, -13.9064]
48 3379.86 [-0.0749469, 442.317, 330.051, -21.2417, -13.9067]
49 3379.93 [-0.0747146, 442.317, 330.051, -21.2355, -13.9075]
Optimizer stop condition: RegularStepGradientDescentOptimizer: Maximum number of iterations (50) exceeded.
Result =
Angle (radians) = -0.0747146
Angle (degrees) = -4.28083
Center X = 442.317
Center Y = 330.051
Translation X = -21.2355
Translation Y = -13.9075
Iterations = 50
Metric value = 3379.93
/dat
Registering /data/reconstruction/specimens/H08-0083_01/register_source/frame0007.jpg to /data/reconstruction/specimens/H08-0083_01/register_target/register0006.jpg, saving as /data/reconstruction/specimens/H08-0083_01/register_target/register0007.jpg
Registration: RegStepGradient Descent + MeanSquaresImageToMetric
0 3979.82 [-0.00920415, 441.34, 329.209, -1.29141, 28.7802]
1 3878.48 [-0.0282893, 441.339, 329.208, -1.22545, 28.7075]
2 3733.22 [-0.0365018, 441.337, 329.207, -1.16408, 28.6291]
3 3698.39 [-0.0413441, 441.335, 329.204, -1.08832, 28.5641]
4 3685.56 [-0.0420542, 441.333, 329.2, -1.00255, 28.5128]
5 3679.62 [-0.0428007, 441.331, 329.196, -0.917178, 28.4609]
6 3674.3 [-0.0427006, 441.329, 329.193, -0.831123, 28.4102]
7 3668.9 [-0.0429859, 441.327, 329.189, -0.745351, 28.3589]
8 3663.93 [-0.0431103, 441.324, 329.185, -0.659161, 28.3084]
9 3658.96 [-0.0425626, 441.322, 329.182, -0.572926, 28.258]
10 3653.35 [-0.0426705, 441.32, 329.178, -0.487139, 28.2068]
11 3648.26 [-0.0422808, 441.318, 329.174, -0.401452, 28.1554]
12 3642.92 [-0.0418189, 441.316, 329.17, -0.316726, 28.1024]
13 3637.71 [-0.0414581, 441.314, 329.167, -0.233236, 28.0476]
14 3632.64 [-0.0422236, 441.312, 329.163, -0.149596, 27.9929]
15 3627.68 [-0.0411496, 441.309, 329.16, -0.06435, 27.9408]
16 3622.89 [-0.0412192, 441.307, 329.156, 0.0175708, 27.8836]
17 3617.85 [-0.0406255, 441.305, 329.153, 0.0995609, 27.8265]
18 3612.89 [-0.0420538, 441.303, 329.15, 0.180126, 27.7674]
19 3607.97 [-0.0411931, 441.3, 329.146, 0.264535, 27.714]
20 3602.87 [-0.0417546, 441.298, 329.143, 0.347719, 27.6586]
21 3598.26 [-0.0416926, 441.296, 329.139, 0.433023, 27.6066]
22 3593.48 [-0.04189, 441.294, 329.135, 0.518506, 27.5549]
23 3588.9 [-0.041197, 441.292, 329.132, 0.603737, 27.5028]
24 3583.88 [-0.0415218, 441.29, 329.128, 0.687607, 27.4485]
25 3579.44 [-0.040545, 441.287, 329.125, 0.770707, 27.393]
26 3574.92 [-0.0398485, 441.285, 329.121, 0.852211, 27.3352]
27 3571.25 [-0.0404639, 441.283, 329.118, 0.931216, 27.274]
28 3566.51 [-0.0402408, 441.281, 329.115, 1.01152, 27.2146]
29 3562.55 [-0.0402583, 441.278, 329.112, 1.09051, 27.1534]
30 3558.37 [-0.0407087, 441.276, 329.109, 1.16785, 27.0901]
31 3554.29 [-0.0412325, 441.273, 329.105, 1.24679, 27.0289]
32 3550.57 [-0.0412839, 441.271, 329.102, 1.32739, 26.9698]
33 3546.78 [-0.0414289, 441.268, 329.099, 1.40715, 26.9096]
34 3543.22 [-0.0414488, 441.266, 329.095, 1.48993, 26.8537]
35 3539.52 [-0.0406032, 441.264, 329.092, 1.57291, 26.7981]
36 3534.49 [-0.0427611, 441.261, 329.088, 1.65092, 26.7357]
37 3533.85 [-0.0368371, 441.259, 329.085, 1.73726, 26.6857]
38 3531.08 [-0.0446605, 441.256, 329.082, 1.7963, 26.6055]
39 3532.27 [-0.0352434, 441.255, 329.078, 1.88678, 26.5642]
40 3530.23 [-0.0446371, 441.252, 329.076, 1.94217, 26.4815]
41 3525.88 [-0.0351682, 441.25, 329.072, 2.03247, 26.4399]
42 3523.87 [-0.0463656, 441.247, 329.07, 2.08494, 26.3556]
43 3527.71 [-0.0322669, 441.246, 329.066, 2.17897, 26.3249]
44 3529.43 [-0.04685, 441.243, 329.065, 2.21682, 26.2336]
45 3524.67 [-0.0318541, 441.242, 329.06, 2.31268, 26.2098]
46 3525.96 [-0.0482122, 441.239, 329.059, 2.34791, 26.1177]
47 3527.84 [-0.029346, 441.238, 329.054, 2.44337, 26.0952]
48 3534.74 [-0.0521854, 441.235, 329.053, 2.47556, 26.0033]
49 3551.75 [-0.0278183, 441.236, 329.048, 2.5721, 26.0111]
Optimizer stop condition: RegularStepGradientDescentOptimizer: Maximum number of iterations (50) exceeded.
Result =
Angle (radians) = -0.0278183
Angle (degrees) = -1.59387
Center X = 441.236
Center Y = 329.048
Translation X = 2.5721
Translation Y = 26.0111
Iterations = 50
Metric value = 3551.75
/dat
Registering /data/reconstruction/specimens/H08-0083_01/register_source/frame0008.jpg to /data/reconstruction/specimens/H08-0083_01/register_target/register0007.jpg, saving as /data/reconstruction/specimens/H08-0083_01/register_target/register0008.jpg
Registration: RegStepGradient Descent + MeanSquaresImageToMetric
0 4247.62 [-0.00732663, 437.237, 331.83, -15.725, 18.5779]
1 4155.39 [-0.0240198, 437.237, 331.83, -15.7109, 18.5329]
2 3913.94 [-0.034961, 437.236, 331.83, -15.7003, 18.4853]
3 3786.07 [-0.0432151, 437.234, 331.83, -15.692, 18.4367]
4 3714.69 [-0.049959, 437.232, 331.829, -15.6871, 18.3875]
5 3662.69 [-0.0567359, 437.229, 331.829, -15.6834, 18.3381]
6 3608.75 [-0.0638737, 437.227, 331.829, -15.6778, 18.289]
7 3557.5 [-0.0688543, 437.223, 331.828, -15.6697, 18.24]
8 3532.83 [-0.0721349, 437.22, 331.827, -15.6601, 18.1912]
9 3522.31 [-0.0742984, 437.217, 331.826, -15.65, 18.1424]
10 3517.24 [-0.0752758, 437.213, 331.826, -15.6402, 18.0935]
11 3514.54 [-0.0755409, 437.209, 331.825, -15.6302, 18.0447]
12 3511.69 [-0.0756087, 437.206, 331.824, -15.6201, 17.9959]
13 3508.73 [-0.0755158, 437.202, 331.823, -15.6099, 17.9471]
14 3505.56 [-0.0755646, 437.198, 331.822, -15.5992, 17.8984]
15 3502.6 [-0.0754981, 437.195, 331.821, -15.5888, 17.8496]
16 3499.47 [-0.0754725, 437.191, 331.82, -15.578, 17.8009]
17 3496.44 [-0.0755008, 437.187, 331.819, -15.5672, 17.7523]
18 3493.51 [-0.0756233, 437.184, 331.818, -15.5564, 17.7036]
19 3490.74 [-0.0755639, 437.18, 331.817, -15.5458, 17.6549]
20 3487.66 [-0.075479, 437.176, 331.816, -15.5351, 17.6062]
21 3484.55 [-0.0753238, 437.173, 331.815, -15.5245, 17.5575]
22 3481.3 [-0.0750614, 437.169, 331.814, -15.5142, 17.5087]
23 3477.97 [-0.0747791, 437.166, 331.813, -15.5039, 17.4599]
24 3474.74 [-0.07469, 437.162, 331.813, -15.4934, 17.4111]
25 3471.79 [-0.0748648, 437.158, 331.812, -15.4833, 17.3623]
26 3469.19 [-0.0748258, 437.155, 331.811, -15.473, 17.3135]
27 3466.38 [-0.0749066, 437.151, 331.81, -15.4634, 17.2646]
28 3463.76 [-0.0747808, 437.147, 331.809, -15.4539, 17.2157]
29 3460.88 [-0.0746416, 437.144, 331.808, -15.4449, 17.1666]
30 3457.99 [-0.074552, 437.14, 331.807, -15.4363, 17.1175]
31 3455.2 [-0.0745281, 437.137, 331.807, -15.4279, 17.0684]
32 3452.53 [-0.0745194, 437.133, 331.806, -15.4197, 17.0192]
33 3449.93 [-0.0744734, 437.129, 331.805, -15.4112, 16.97]
34 3447.28 [-0.0745809, 437.126, 331.804, -15.4022, 16.921]
35 3444.96 [-0.07452, 437.122, 331.804, -15.3928, 16.872]
36 3442.36 [-0.0742986, 437.118, 331.803, -15.3834, 16.8231]
37 3439.44 [-0.0741331, 437.115, 331.802, -15.3737, 16.7741]
38 3436.61 [-0.0740284, 437.111, 331.801, -15.365, 16.7251]
39 3433.91 [-0.0738832, 437.108, 331.8, -15.3561, 16.676]
40 3431.15 [-0.0739162, 437.104, 331.799, -15.3468, 16.627]
41 3428.75 [-0.0738143, 437.1, 331.799, -15.3371, 16.5781]
42 3426.09 [-0.0737325, 437.097, 331.798, -15.3279, 16.5291]
43 3423.49 [-0.0735485, 437.093, 331.797, -15.3189, 16.48]
44 3420.73 [-0.0735359, 437.09, 331.796, -15.3103, 16.4309]
45 3418.29 [-0.0733907, 437.086, 331.795, -15.3015, 16.3818]
46 3415.63 [-0.0733578, 437.082, 331.795, -15.2927, 16.3327]
47 3413.21 [-0.0731961, 437.079, 331.794, -15.284, 16.2836]
48 3410.6 [-0.0730443, 437.075, 331.793, -15.2754, 16.2345]
49 3408.06 [-0.0730359, 437.072, 331.792, -15.2665, 16.1855]
Optimizer stop condition: RegularStepGradientDescentOptimizer: Maximum number of iterations (50) exceeded.
Result =
Angle (radians) = -0.0730359
Angle (degrees) = -4.18465
Center X = 437.072
Center Y = 331.792
Translation X = -15.2665
Translation Y = 16.1855
Iterations = 50
Metric value = 3408.06
/dat
Registering /data/reconstruction/specimens/H08-0083_01/register_source/frame0009.jpg to /data/reconstruction/specimens/H08-0083_01/register_target/register0008.jpg, saving as /data/reconstruction/specimens/H08-0083_01/register_target/register0009.jpg
Registration: RegStepGradient Descent + MeanSquaresImageToMetric
0 5500.84 [-0.0107656, 436.582, 334.124, -5.60864, 45.4124]
1 5373.48 [-0.0563529, 436.581, 334.124, -5.59704, 45.3242]
2 4725.59 [-0.107046, 436.576, 334.125, -5.61319, 45.2396]
3 4281.15 [-0.110892, 436.58, 334.128, -5.64391, 45.2785]
4 4283.16 [-0.110164, 436.585, 334.13, -5.66089, 45.3252]
5 4281.68 [-0.108975, 436.59, 334.133, -5.67866, 45.3716]
6 4280.62 [-0.110871, 436.594, 334.136, -5.70831, 45.4115]
7 4281.81 [-0.11075, 436.599, 334.138, -5.72606, 45.4579]
8 4281.23 [-0.110235, 436.604, 334.141, -5.74649, 45.5032]
9 4280.37 [-0.110119, 436.609, 334.144, -5.77016, 45.5469]
10 4279.99 [-0.1101, 436.613, 334.147, -5.79525, 45.5898]
11 4279.74 [-0.111162, 436.618, 334.15, -5.82099, 45.6323]
12 4280.22 [-0.111475, 436.623, 334.152, -5.84251, 45.6771]
13 4280.35 [-0.111878, 436.628, 334.155, -5.8611, 45.7232]
14 4280.71 [-0.111357, 436.633, 334.157, -5.87656, 45.7704]
15 4279.65 [-0.11159, 436.638, 334.159, -5.89619, 45.816]
16 4279.69 [-0.111698, 436.643, 334.161, -5.91083, 45.8635]
17 4279.61 [-0.111855, 436.648, 334.163, -5.92671, 45.9106]
18 4279.59 [-0.111557, 436.653, 334.165, -5.93943, 45.9586]
19 4279.02 [-0.111421, 436.659, 334.167, -5.95621, 46.0054]
20 4278.69 [-0.111258, 436.663, 334.17, -5.97548, 46.0512]
21 4278.32 [-0.111099, 436.668, 334.172, -5.99581, 46.0966]
22 4278.01 [-0.111158, 436.673, 334.175, -6.02178, 46.1389]
23 4277.91 [-0.111828, 436.677, 334.179, -6.04876, 46.1807]
24 4278.09 [-0.109487, 436.682, 334.181, -6.07009, 46.2255]
25 4276.46 [-0.115393, 436.686, 334.185, -6.09857, 46.2658]
26 4283.1 [-0.111366, 436.692, 334.185, -6.10366, 46.315]
27 4277.35 [-0.112934, 436.696, 334.189, -6.1358, 46.3529]
28 4278.21 [-0.114209, 436.701, 334.192, -6.16065, 46.3959]
29 4279.89 [-0.112459, 436.706, 334.194, -6.17532, 46.4433]
30 4277.26 [-0.113416, 436.71, 334.198, -6.20747, 46.4812]
31 4278.2 [-0.11482, 436.715, 334.201, -6.22897, 46.526]
32 4280.14 [-0.111609, 436.721, 334.202, -6.23505, 46.5752]
33 4276.49 [-0.116458, 436.725, 334.206, -6.26885, 46.6113]
34 4282.73 [-0.110879, 436.73, 334.207, -6.27353, 46.6604]
35 4276.04 [-0.120588, 436.735, 334.21, -6.30062, 46.701]
36 4292.97 [-0.113071, 436.74, 334.209, -6.28999, 46.7489]
37 4277.28 [-0.116084, 436.745, 334.212, -6.30947, 46.7945]
38 4280.69 [-0.111913, 436.751, 334.213, -6.31935, 46.843]
39 4276.53 [-0.125948, 436.755, 334.216, -6.34455, 46.8835]
40 4315.15 [-0.116046, 436.761, 334.215, -6.33087, 46.9301]
41 4279.84 [-0.112865, 436.767, 334.216, -6.34278, 46.9782]
42 4277.33 [-0.120517, 436.771, 334.219, -6.36711, 47.0209]
43 4289.25 [-0.111558, 436.777, 334.219, -6.36018, 47.0692]
44 4276.85 [-0.134971, 436.78, 334.223, -6.39492, 47.0961]
45 4363.78 [-0.120206, 436.786, 334.222, -6.38071, 47.1412]
46 4287.15 [-0.111951, 436.792, 334.221, -6.3719, 47.1894]
47 4277.21 [-0.125171, 436.792, 334.223, -6.39298, 47.1899]
48 4307.29 [-0.122571, 436.794, 334.223, -6.39017, 47.2017]
49 4295.26 [-0.120129, 436.795, 334.223, -6.38688, 47.2134]
Optimizer stop condition: RegularStepGradientDescentOptimizer: Maximum number of iterations (50) exceeded.
Result =
Angle (radians) = -0.120129
Angle (degrees) = -6.88291
Center X = 436.795
Center Y = 334.223
Translation X = -6.38688
Translation Y = 47.2134
Iterations = 50
Metric value = 4295.26
/dat
Finally, we convert the registered frames into a video to quickly review the alignment.
In [17]:
# generate videos of the result
pe.generateSourceVideo()
pe.generateRegisteredVideo()
/usr/bin/avconv -f image2 -i /data/reconstruction/specimens/H08-0083_01/register_source/frame%04d.jpg -r 12 -s hd1080 /data/reconstruction/specimens/H08-0083_01/video/source.mp4
/usr/bin/avconv -f image2 -i /data/reconstruction/specimens/H08-0083_01/register_target/register%04d.jpg -r 12 -s hd1080 /data/reconstruction/specimens/H08-0083_01/video/register.mp4
In [12]:
pe.createContrastUsingSK()
* createContrast with scikit image
--------------------------------------------------------------------------------
/data/reconstruction/specimens/H08-0083_01/register_raw/006-100034525-DSx4.jpg
/data/reconstruction/specimens/H08-0083_01/register_raw/036-100034525-DSx4.jpg
/data/reconstruction/specimens/H08-0083_01/register_raw/066-100034525-DSx4.jpg
/data/reconstruction/specimens/H08-0083_01/register_raw/096-100034525-DSx4.jpg
/data/reconstruction/specimens/H08-0083_01/register_raw/126-100034525-DSx4.jpg
/data/reconstruction/specimens/H08-0083_01/register_raw/156-100034525-DSx4.jpg
/data/reconstruction/specimens/H08-0083_01/register_raw/186-100034525-DSx4.jpg
/data/reconstruction/specimens/H08-0083_01/register_raw/216-100034525-DSx4.jpg
/data/reconstruction/specimens/H08-0083_01/register_raw/246-100034525-DSx4.jpg
/data/reconstruction/specimens/H08-0083_01/register_raw/276-100034525-DSx4.jpg
We can leverage IPython notebook's HTML display capability to review all of the images
In [13]:
from IPython.core.display import HTML
HTML(pe.generateSummaryTable())
Out[13]:
Original - Contrast - Contrast Scikit - Registered/data/reconstruction/specimens/H08-0083_01/register_raw/006-100034525-DSx4
/data/reconstruction/specimens/H08-0083_01/register_raw/036-100034525-DSx4
/data/reconstruction/specimens/H08-0083_01/register_raw/066-100034525-DSx4
/data/reconstruction/specimens/H08-0083_01/register_raw/096-100034525-DSx4
/data/reconstruction/specimens/H08-0083_01/register_raw/126-100034525-DSx4
/data/reconstruction/specimens/H08-0083_01/register_raw/156-100034525-DSx4
/data/reconstruction/specimens/H08-0083_01/register_raw/186-100034525-DSx4
/data/reconstruction/specimens/H08-0083_01/register_raw/216-100034525-DSx4
/data/reconstruction/specimens/H08-0083_01/register_raw/246-100034525-DSx4
/data/reconstruction/specimens/H08-0083_01/register_raw/276-100034525-DSx4
Alternatively, we can load an image into the environment directly and present it via matplotlib
In [10]:
# get a file to load
img_to_load = pe.processing_status['regcontrast'][3]
print img_to_load
/data/reconstruction/specimens/H08-0083_01/register_contrast/096-100034525-DSx4-c.jpg
In [11]:
# bring in the scipy and pylab methods
from scipy import ndimage
from pylab import *
# load the image from disk into memory
img = ndimage.imread(img_to_load)
# display its dimensions
print img.shape
(750, 1000)
In [16]:
# Set the plot size
fig, ax = subplots(figsize=(20, 20))
# and show the image, applying a grayscale color map
ax.imshow(img, cmap='gray')
Out[16]:
<matplotlib.image.AxesImage at 0x483e6d0>
In [ ]:
Content source: richstoner/postmortem-processing-tools
Similar notebooks: